package cn.wolfcode.crm.util;

import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * Created by Administrator on 2018/5/27.
 */

//转换json工具
public abstract class JSONUtil {
    private static ObjectMapper mapper = new ObjectMapper();

    public static String toJSONString (Object obj){
        try {
            return mapper.writeValueAsString(obj);
        }catch (Exception e){
            throw new RuntimeException(e);
        }
    }
}
